package org.example.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * Created with IntelliJ IDEA 2023.
 * Description:
 * User: homechen
 * Date: 2024-03-30
 * Time: 10:59
 */
@Data
@TableName("User")   // 指定表名
public class User {
    @TableId(value = "id", type = IdType.AUTO)  // 设置主键    自动分配ID
    private int id;
    @TableField("name")  // 设置普通字段
    private String name;
    private int age;
    private String email;
    @TableField(exist = false)   // 数据库没有这个字段
    private int enname;
}
